//
//  HKComponentsViewController.m
//  HKiOSTools
//
//  Created by 胡锦涛 on 2020/12/22.
//

#import "HKComponentsViewController.h"
#import "CommonBundle.h"
// 架构框架
#import "BifrostHeader.h"
#import "ComponentsModuleService.h"
@interface HKComponentsViewController ()

@end

@implementation HKComponentsViewController
+ (void)load {
    [Bifrost bindURL:kRouteComponentsPage
           toHandler:^id _Nullable(NSDictionary * _Nullable parameters) {
        return [HKComponentsViewController new];
    }];
}
- (void)setupNavigationItems {
    [super setupNavigationItems];
    self.title = @"Components";
    self.navigationItem.rightBarButtonItem = [UIBarButtonItem qmui_itemWithImage:[CommonBundle imageNamed:@"icon_nav_about"] target:self action:@selector(handleAboutItemEvent)];
    AddAccessibilityLabel(self.navigationItem.rightBarButtonItem, @"打开关于界面");
}

- (void)initDataSource {
    [super initDataSource];
    self.dataSource = [[QMUIOrderedDictionary alloc] initWithKeysAndObjects:
                       @"QMUIModalPresentationViewController", [CommonBundle imageNamed:@"icon_grid_modal"],
                       @"QMUIDialogViewController", [CommonBundle imageNamed:@"icon_grid_dialog"],
                       @"QMUIMoreOperationController", [CommonBundle imageNamed:@"icon_grid_moreOperation"],
                       @"QMUINavigationTitleView", [CommonBundle imageNamed:@"icon_grid_titleView"],
                       @"QMUIEmptyView", [CommonBundle imageNamed:@"icon_grid_emptyView"],
                       @"QMUIToastView", [CommonBundle imageNamed:@"icon_grid_toast"],
                       @"QMUIEmotionView", [CommonBundle imageNamed:@"icon_grid_emotionView"],
                       @"QMUIGridView", [CommonBundle imageNamed:@"icon_grid_gridView"],
                       @"QMUIFloatLayoutView", [CommonBundle imageNamed:@"icon_grid_floatView"],
                       @"QMUIStaticTableView", [CommonBundle imageNamed:@"icon_grid_staticTableView"],
                       @"QMUICellKeyCache", [CommonBundle imageNamed:@"icon_grid_cellKeyCache"],
                       @"QMUIPickingImage", [CommonBundle imageNamed:@"icon_grid_pickingImage"],
                       @"QMUIAssetsManager", [CommonBundle imageNamed:@"icon_grid_assetsManager"],
                       @"QMUIImagePreviewView", [CommonBundle imageNamed:@"icon_grid_previewImage"],
                       @"QMUIPieProgressView", [CommonBundle imageNamed:@"icon_grid_pieProgressView"],
                       @"QMUIPopupContainerView", [CommonBundle imageNamed:@"icon_grid_popupView"],
                       @"QMUIKeyboardManager", [CommonBundle imageNamed:@"icon_grid_keyboard"],
                       @"QMUIMarqueeLabel", [CommonBundle imageNamed:@"icon_grid_marquee"],
                       @"QMUIMultipleDelegates", [CommonBundle imageNamed:@"icon_grid_multipleDelegates"],
                       @"QMUIBadge", [CommonBundle imageNamed:@"icon_grid_badge"],
                       @"QMUIScrollAnimator", [CommonBundle imageNamed:@"icon_grid_scrollAnimator"],
                       @"QMUIConsole", [CommonBundle imageNamed:@"icon_grid_console"],
                       @"QMUICollectionViewLayout", [CommonBundle imageNamed:@"icon_grid_collection"],
                       @"QMUITheme", [CommonBundle imageNamed:@"icon_grid_theme"],
                       nil];
}

- (void)didSelectCellWithTitle:(NSString *)title {
    
}

- (void)handleAboutItemEvent {
    QMUIThemeManagerCenter.defaultThemeManager.currentThemeIdentifier = HKThemeIdentifierCustom;
}

@end
